﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
namespace BUS
{
    public class ChiTietHoaDonBUS
    {
        ChiTietHoaDonDAO ctDao = new ChiTietHoaDonDAO();
        public List<ChiTietHoaDonDTO> LayDanhSachChiTietHoaDon(int ma)
        {
            return ctDao.LayDanhSachChiTietHoaDon(ma);
        }
        public int ThemChiTietHoaDon(ChiTietHoaDonDTO cthddto)
        {
            return ctDao.ThemChiTietHoaDon(cthddto);
        }
        public int CapNhatChiTietHoaDon(ChiTietHoaDonDTO cthddto, int MaMonCu)
        {
            return ctDao.CapNhatChiTietHoaDon(cthddto, MaMonCu);
        }
        public int XoaChiTietHoaDon(ChiTietHoaDonDTO cthd)
        {
            return ctDao.XoaChiTietHoaDon(cthd);
        }
        public int XoaChiTietHoaDon(int mahd)
        {
            return ctDao.XoaChiTietHoaDon(mahd);
        }
        public float TinhTongTienChiTietHoaDon(int MaHD)
        {
            return ctDao.TinhTongTienChiTietHoaDon(MaHD);
        }
        public int CapNhatMaBanChiTietHoaDon(string MaBanCu, string MaBanMoi)
        {
            return ctDao.CapNhatMaBanChiTietHoaDon(MaBanCu, MaBanMoi);
        }
        public int LayMaHDChiTietHoaDon(string MaBan)
        {
            return ctDao.LayMaHDChiTietHoaDon(MaBan);
        }
        public int CapNhatMaBanTheoHD(ChiTietHoaDonDTO BanCu, ChiTietHoaDonDTO BanMoi)
        {
            return ctDao.CapNhatMaBanTheoHD(BanCu, BanMoi);
        }
        public int KiemTraTrungMa(ChiTietHoaDonDTO cthd)
        {
            return ctDao.KiemTraTrungMa(cthd);
        }
        public List<ChiTietHoaDonDTO> LayMaMonAnBietMaHD_MaBan(ChiTietHoaDonDTO cthd)
        {
            return ctDao.LayMaMonAnBietMaHD_MaBan(cthd);
        }
        public int LaySoLuongBietMaHD_MaBan_MaMonAn(ChiTietHoaDonDTO cthd)
        {
            return ctDao.LaySoLuongBietMaHD_MaBan_MaMonAn(cthd);
        }
        public int LayMaHDChiTietHoaDonDam(string MaBan)
        {
            return ctDao.LayMaHDChiTietHoaDonDam(MaBan);
        }
    }
}
